package org.Keks.example.Solitaire;

import java.awt.Canvas;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;
import javax.swing.JPanel;

import org.Keks.KeksGame;


/**
 * The main main MAIN (!!!) class of our project.
 * This is the only class where our good old java AWT does the visible graphics work.
 * @author kevin
 *
 */
public class Example02_Solitaire extends KeksGame {
	private static final long serialVersionUID = 1L;
	
	public static void main(String[] args) {
		Example02_Solitaire sb = new Example02_Solitaire();
		JFrame frame = new JFrame();
		gamemap = new SpritesMap(keys, (Component)sb);
		
		frame.addWindowListener(new WindowAdapter(){
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
		});

		frame.add(sb, 0);
		frame.setResizable(false);
		frame.setVisible(true);
		frame.pack();
		frame.setLocationRelativeTo(null);
		sb.start();
	}

	public void run() {
		super.run();
	}
	
	/**
	 * Method which is called every frame. Must contain tick() from Map class.
	 */
	public void tick() {
		super.tick();
	}
	
	public void init() {
		super.init();
	}
	
	public void start() {
		super.start();
	}
	
	public void stop() {
		super.stop();
	}
	
	public void paint(Graphics g) {
		super.paint(g);
	}
}
